Timothy Budd's Little Smalltalk system has been around since 1985, when it was conceived primarily as a teaching aid for computer science students. It is, in effect, a greatly simplified version of Smalltalk-80 yet it still manages to capture the essence of Object Oriented Programming whilst doing away with many of the 'bells and whistles' to be found in any full Smalltalk implementation.
The original version of Little Smalltalk assumed only the presence of a character terminal, therefore support for graphics of any sort was necessarily somewhat limited. With version three, Timothy Budd recognised the growing importance of windowing interfaces on many platforms and set about providing Little Smalltalk with basic windowing features. Guido van Rossum's Stdwin package was chosen to provide a universal library of windowing functions.
In this version, customised for the Macintosh environment, I have chosen instead to use Symantec™'s Think Class Library (TCL) as a basis for a much more Macintosh-friendly interface than Stdwin provides. This of course sacrifices a certain amount of platform independence, although I have largely isolated and documented my API so that others may port it, should they wish to do so. By using the TCL, I have been able to provide a full range of facilities:
• Full clipboard-based cut and paste.
• Support for the Apple, File and Edit menus (including an About... dialogue).
• A Smalltalk-80 style class browser and the ability to open multiple browsers.
• Instance, Class Hierarchy and Collection inspectors with the ability to change
displayed values.
• Limited drag and drop for files. (Multiple selections not supported. Text files and
system images only.)
• File types are used when reading and saving files.
• The system now has a resource file.
• Macintosh-oriented file handling with hierarchical directory support*.
• Pop-up menus.
• Many new classes and methods.
* the restriction whereby all files needed to be in the same directory as the executable files now only applies to files read in by the initial image creation utility. Files created and read by the full system are restricted only to the default volume (until I can figure out a better way of storing volume and directory info).
Quick Installation
================
Create a folder called 'Little Smalltalk and copy all files ending in '.st', the file 'systemImage' and the programs 'Little Smalltalk' and 'LSt Image Maker' to this folder. The C source code should, for convenience, be placed in a sub-folder, as should the documentation files. A suggested folder structure would be:
Little Smalltalk
[Executables, Smalltalk source and systemImage; Think-C projects and resource
files (optional)]
C Sources (optional)
Headers
Sources
Documentation
Stdwin to TCL
=============
In moving from a Stdwin based implementation to one based on the TCL, I have tried to incorporate as much as possible of the Stdwin API into my own API (as defined by the two interface modules, 'glue1.cp' and 'glue2.cp'). This was done in order to ease the initial transition from one interface library to another and, in fact, the transition has been achieved with surprisingly few modifications to either TCL functionality or the Little Smalltalk code itself. Within Little Smalltalk, the main changes have been to redefine the identifier 'class' so that there is no conflict with the synonymous Think-C reserved word and to translate the K & R C code into ANSI C, a change necessitated by the adoption of the TCL. In addition, I have created a new module, 'macio.c', which is used as a replacement for 'unixio.c' and provides a Mac Toolbox-, rather than a C-, based file handling strategy (albeit not particularly well optimised). This has meant adding a #define to the module 'filein.c' to redirect calls to the stdlib routine 'fgets ()' to my own Mac-based routine. I have also replaced the file 'winprim.c' with the file 'tclprim.c', to make it easier to compile with your preferred library (Stdwin or TCL). All other changes to the basic Little Smalltalk C source have been extremely minor and have largely been restricted to user interface bug-fixes and increasing the functionality of the basic system. All changes may be turned on or off by defining or undefining the compiler switch 'TCL' as appropriate and replacing the files 'macio.c' and 'tclprim.c', again as appropriate.
Differences between the TCL and Stdwin versions of Little Smalltalk
Whilst I have tried to remain faithful to the Stdwin API (extensions aside) certain differences are inevitable. Fortunately, the only serious differences are restricted to the implementation of menus.
As those who are familiar with the TCL will know, it uses exclusively resource based menus, linked to program code by the use of command numbers. However, Stdwin creates its menus 'on the fly' without using resources. Furthermore, Stdwin refers to menu items by the standard menu number/item number approach. Rather than attempt to reconcile these two methods, I have kept the TCL way of doing things for the standard system functions (the Apple, File and Edit menus) which are outside of Little Smalltalk's control whilst using the Stdwin technique for the Smalltalk-based menus (System, Windows and all pop-up menus). The only extra work this means, for the Smalltalk programmer, is that menu stubs must be created in the menu bar resource for each menu to be used (pop-up menus are the exception). This is a bit of a kludge which I hope to rectify in the future.
To alleviate this to a certain extent, I have provided 'pop-up menus' which do not rely on the TCL way of doing things. Pop-up menus may be attached to individual window 'panes' (another concept I have incorporated) and may be activated in whatever way you choose, though making them appear in response to a click of a notional second mouse button (simulated on the Macintosh by option-click) is the recommended approach.
Window panes are provided which allow a window to be divided up into independent areas, each of which may be scrolled, selected and have its fonts and text attributes changed (where appropriate) without affecting any other panes. Within Smalltalk, you can attach up to two separate actions to each pane - one for each notional mouse button. This ensures no conflict of functions whilst using pop-up menus, for example.
Little Smalltalk v4.0
===================
Immediately prior to the release of this version, Timothy Budd announced the availability of a beta release of Little Smalltalk v4.0. Smaller still than v3, v4 incorporates a garbage collecting memory manager, amongst other improvements. Once it has settled down, I will be endeavouring to port it to the Mac and, where possible, to incorporate the interface enhancements I have made in v3.1.4.
Future Directions
=================
In this initial release, I have not, to any great extent, increased the language functionality provided by the basic version three system. What I have done is to stabilise the user-interface, implement basic Macintosh features and to polish up one or two rough edges. In the future, I would like to:
• provide some means of calling 'C' functions from Little Smalltalk so that I can
fully decouple the windowing code from the rest of the system and also increase
the system's flexibility.
• provide some of the language constructs found in real Smalltalk but missing from
Little Smalltalk
• increase the functionality of the browser to include class and message categories
• provide some kind of debugging facilities.
Needless to say, I am also open to any suggestions.
Copyright Stuff
==============
Due to commercial copyright constraints, I cannot supply the source code for the Think Class Library core classes so, unless you have Think-C™ v5 or Symantec™ C++ and TCL v1.1.3, the C source for my interface may not be a lot of use to you. Obviously, this does not affect the executable files or the Little Smalltalk source files. In the future, I may try and reduce reliance on the TCL. Not only will this reduce the size of the executable code, but it will also allow me to make more of the source code available in the Public Domain.
Whilst Little Smalltalk itself is fully Public Domain with no restrictions whatsoever, I am retaining copyright on my TCL-based windowing interface. Put simply, this means that anyone wishing to incorporate all or parts of my copyrighted interface code into any commercial product must seek my permission first. Shareware and Public Domain programmers wishing to incorporate all or parts of my source code need only extend me the usual courtesy of crediting my work. There are no other restrictions on copying my source, provided that the comments at the head of each module remain intact. If you wish to redistribute the whole system you must ensure that _all_ of the files enclosed with this release are redistributed intact and any copyright notices, such as this one, remain unchanged.
And Finally....
============
Suggestions, comments, criticisms, praise and offers of large sums of money are welcome via email to:
BarkwayJ@RFERL.org
Also please email me if you wish to be placed on a list of people to be notified of future releases as and when they become available.
And Finally (really)....
===================
If anyone can come up with better icon designs please let me know. As you can see, I am not much of an artist....